package com.example.springboot.service.Impl;

import com.example.springboot.pojo.Dishinfo;
import com.example.springboot.service.DishinfoService;
import com.example.springboot.mapper.DishinfoMapper;
/*import com.example.demo.pojo.DishnifoMapper;*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service

public class DishinfoServiceImpl implements DishinfoService {
    @Autowired
    private DishinfoMapper dishinfoMapper;
    @Override
    public List<Dishinfo> list(){
        return dishinfoMapper.list();

    }

    @Override
    public void delete(List<Integer> ids) {
        dishinfoMapper.delete(ids);
    }
    /*@Override
    public void delete(Integer id) {
        DishnifoMapper.deleteById(id);
    }*/

    @Override
    public void add(Dishinfo Dishinfo) {
        dishinfoMapper.insert(Dishinfo);

    }
    @Override
    public Dishinfo selectById(Integer id) {
        return dishinfoMapper.selectById(id);
    }

    @Override
    public void update(Dishinfo dishinfo) {
        dishinfoMapper.update(dishinfo);
    }

}
